<?php

$torrentfile = "torrents/The Best Of The Angels.torrent";
$filesize = filesize($torrentfile);
$filename = "The Best Of The Angels.torrent";
curl_setopt();
header("Content-Type: application/x-bittorrent");
header("Content-Length: ".$filesize."\r\n");

if (isset($_GET['nyaa'])) {
	header("Content-Disposition: inline; filename=\"$filename\"");
} else {
	header("Content-Disposition: attachment; filename=\"$filename\"");
	header("Server: nginx");
	header("X-Frame-Options: SAMEORIGIN");
}
readfile($torrentfile);

?>